<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="../../style/css/back/style.css" rel="stylesheet" type="text/css">
    <script src="../../style/js/jquery-1.8.3.js"></script>

    <script type="text/javascript">
        function check() {
            var hh = document.getElementById("new").value;
            var jj = document.getElementById("new1").value;
            if (hh == jj) {
                $("#spanid").html("密码一致");
            } else {
                $("#spanid").html("密码不一致");
            }

        }

        function updata() {
            var hh = document.getElementById("new").value;
            var kk = document.getElementById("old").value;
            var id = sessionStorage.getItem("id")
            $.post("../../admin/updatapas", {old: kk, newpas: hh, id: id}, function (res) {
                alert(res.msg);
            }, "json")
        }

    </script>
</head>
<body>
<div class="formbody">
    <div class="formtitle"><span>基本信息</span></div>
    <ul class="forminfo">
        <li>
            输入旧密码<input name="password" type="password" class="dfinput" id="old"><br>
        </li>
        <li>
            输入新密码<input name="password" type="password" class="dfinput" id="new"><br>
        </li>
        <li>
            确认新密码<input name="password" type="password" class="dfinput" id="new1" onblur="check()"><br>
        </li>
        <li>
            <span id="spanid"></span><br>
        </li>
        <li>
            <input type="button" value="确认修改" onclick="updata()">
        </li>
    </ul>


</div>

</body>
</html>